DIST= ../bin/
CC=gcc
CCFLAGS=-I/home/xt8021/Desktop/sqlite-autoconf-3150200 \
        -L/home/xt8021/Desktop/sqlite-autoconf-3150200/.lib/ -lsqlite3

all:    channel_aud.cgi   \
        channel_para.cgi  \
        upwd.cgi login.cgi\
        phase_aud.cgi     \
        phase_init.cgi    \
        phase_edit.cgi    \
        phase_para.cgi    \
        stage_timing.cgi  \
        stage_timing_aud.cgi \
        time_schedule.cgi    \
        time_schedule_aud.cgi\
        time_table.cgi       \
        time_table_aud.cgi   \
        timing_scheme.cgi    \
        timing_scheme_aud.cgi\
        starop.cgi  \
        download.cgi\
        sigc_mod.cgi\
	sigc_feature.cgi\
        restore.cgi
	rm  $(DIST) -rf
	mkdir $(DIST) 
	mv *.cgi $(DIST)
.PHONY :all
sigc_mod.cgi: sigc_mod.c cgi.c cookie.c stdx.c
	$(CC) $^ -o $@ $(CCFLAGS)
sigc_feature.cgi: sigc_feature.c cgi.c cookie.c stdx.c
	$(CC) $^ -o $@ $(CCFLAGS)
restore.cgi: restore.c cgi.c stdx.c
	$(CC) $^ -o $@ $(CCFLAGS)
download.cgi:download.c cgi.c cookie.c stdx.c
	$(CC) $^ -o $@ $(CCFLAGS)
starop.cgi:starop.c cgi.c cookie.c stdx.c
	$(CC) $^ -o $@ $(CCFLAGS)
channel_aud.cgi:channel_aud.c cgi.c cookie.c stdx.c
	$(CC) $^ -o $@ $(CCFLAGS)
phase_init.cgi:channel_init.c cgi.c cookie.c stdx.c
	$(CC) $^ -o $@ $(CCFLAGS)
channel_para.cgi:channel_para.c cgi.c cookie.c stdx.c
	$(CC) $^ -o $@ $(CCFLAGS)
phase_aud.cgi:phase_aud.c cgi.c cookie.c stdx.c
	$(CC) $^ -o $@ $(CCFLAGS)	
phase_edit.cgi:phase_edit.c cgi.c cookie.c stdx.c
	$(CC) $^ -o $@ $(CCFLAGS)	
phase_para.cgi:phase_para.c cgi.c cookie.c stdx.c
	$(CC) $^ -o $@ $(CCFLAGS)
stage_timing.cgi:stage_timing.c cgi.c cookie.c stdx.c
	$(CC) $^ -o $@ $(CCFLAGS)
stage_timing_aud.cgi:stage_timing_aud.c cgi.c cookie.c stdx.c
	$(CC) $^ -o $@ $(CCFLAGS)
time_schedule.cgi:time_schedule.c cgi.c cookie.c stdx.c
	$(CC) $^ -o $@ $(CCFLAGS)
time_schedule_aud.cgi:time_schedule_aud.c cgi.c cookie.c stdx.c
	$(CC) $^ -o $@ $(CCFLAGS)
time_table.cgi:time_table.c cgi.c cookie.c stdx.c
	$(CC) $^ -o $@ $(CCFLAGS)
time_table_aud.cgi:time_table_aud.c cgi.c cookie.c stdx.c
	$(CC) $^ -o $@ $(CCFLAGS)
timing_scheme.cgi:timing_scheme.c cgi.c cookie.c stdx.c
	$(CC) $^ -o $@ $(CCFLAGS)
login.cgi:login.c cgi.c cookie.c stdx.c
	$(CC) $^ -o $@ $(CCFLAGS)
upwd.cgi:upwd.c cgi.c cookie.c stdx.c
	$(CC) $^ -o $@ $(CCFLAGS)
timing_scheme_aud.cgi:timing_scheme_aud.c cgi.c cookie.c stdx.c
	$(CC) $^ -o $@ $(CCFLAGS)

clean:
	rm $(DIST) -rf
